<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>css background-color</title>
</head>
<body>

    <p>paragraph</p>
    <hr>

    <h1>inherit</h1>
    <p style="background-color:inherit">paragraph</p>
    <hr>

    <h1>color_name</h1>
    <p style="background-color: red">paragraph</p>
    <hr>

    <h1>hex_number</h1>
    <p style="background-color: #00ff00">paragraph</p>
    <hr>

    <h1>rgb_number</h1>
    <p style="background-color: rgb(0,255,0)">paragraph</p>
    <hr>

    <h1>transparent</h1>
    <p style="background-color: transparent">paragraph</p>
    <hr>

    <h1>设置部分文本的背景颜色</h1>
    <p>这是<span style="background-color: yellow">文本</span></p>
</body>
</html>